/* 
 * File:   BRIC2.h
 * Author: nata
 *
 * Created on April 12, 2012, 4:53 PM
 */

#ifndef BRIC2_H
#define	BRIC2_H

#include "Node.h"
#include "Image.h"
#include "Layout.h"
#include <map>
#include <opencv/cv.h>

using namespace std;

class BRIC {
    Node* root;
    int height;
    int width;
    double alpha;
    double beta;

    bool layoutValido(Layout* layout);
    void calculate(Node* root, Orientation orientation);
    
public:
    
    BRIC(int height, int width, double alpha, double beta);
    void addImage(Image* image);
    void removeImage(int id);
    void harmonize();
    int getHeight();
    int getWidth();
    double getAlpha();
    double getBeta();
    Image* getImage(int id);
    Node* getTree();
    void setHeight(int height);
    void setWidth(int width);
    void setAlpha(double alpha);
    void setBeta(double beta);
    void renderPreview(IplImage* surface, CvFont* font);
    void render(IplImage* surface, CvFont* font);
};

#endif	/* BRIC2_H */

